package com.tj.collection.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/1/13
 * Time: 下午1:39
 */
public enum ClAgentStatusEnums {
    NORMAL(1, "正常"),
    LEAVE(2, "请假"),
    LOCKING(3, "锁定"),
    OUTGOING(4, "离职"),
    ;

    private Integer status;

    private String desc;

    ClAgentStatusEnums(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static  ClAgentStatusEnums getEnum(Integer type) {
         ClAgentStatusEnums statusEnums = null;
        for ( ClAgentStatusEnums e :  ClAgentStatusEnums.values()) {
            if (e.getStatus().equals(type)) {
                statusEnums = e;
            }
        }
        return statusEnums;
    }

    public Integer getStatus() {
        return status;
    }

    public  ClAgentStatusEnums setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public  ClAgentStatusEnums setDesc(String desc) {
        this.desc = desc;
        return this;
    }
}
